import {SELECTMODEL} from './actionType'
import { get } from '@u/http'

const loadSync =list=>{
    return{
        type: SELECTMODEL,
        list
    }
} 

const loadAsync = ()=>{
    return async dispatch=>{
        let result = await get({
            url:'api/keJian/models/?kjId=1&xkId=1'
        })
        dispatch( loadSync( result.data.models ))
    }
}

export {
    loadSync,
    loadAsync
}